import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: dings
 * Date: 2024-06-04
 * Time: 20:48
 */
public class Test {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        System.out.println(list);


        ArrayList<Integer> list2 = new ArrayList<>(list);
        list2.add(4);
        System.out.println(list2);
    }
}
